package edu.aysf.clients.fallback;

//import edu.aysf.clients.UserClient;
//import edu.aysf.entity.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;

/*
 * @Author 郑老师
 * @Version: 1.0
 * @Desc
 * @Date 2024-12-08 00:06
 * @Update
 */
//@Slf4j
//public class UserClientFallbackFactory implements FallbackFactory<UserClient> {
//
//    // 降级逻辑
//    @Override
//    public UserClient create(Throwable cause) {
//        return new UserClient() {
//            @Override
//            public User findById(Long id) {
//                log.error("查询用户异常");
//                return new User();
//            }
//        };
//    }
//}
